<?phpuse Illuminate\Database\Eloquent\Model;use Illuminate\Database\Capsule\Manager as DB;class twostageModel extends Model{	protected $table 		= 'twostage';	public	  $primaryKey	= 'twostage_id';    protected function serializeDate($date)    {        return $date->format('Y-m-d H:i:s');    }    public function member()    {        return $this->belongsTo(memberModel::class, 'twostage_id', 'id');    }    public function twostage_last_log()    {        return $this->hasOne(twostageModel::class, 'twostage_id', 'twostage_id')->orderBy('id', 'desc');    }    public function twostage_log()    {        return $this->hasMany(twostageModel::class, 'twostage_id', 'twostage_id')->orderBy('id', 'desc');    }    public function twostage_level()    {        return $this->hasOne(twostagelevelModel::class, 'level', 'level');    }}